package com.maxmlr.music.system.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author max
 * @version 1.0
 * @ClassName Files
 * @Description 文件上传
 * @Copyright Copyright (c) 2020: www.maxmlr.com.
 * @since 2020-06-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_files")
@ApiModel(value="Files对象", description="文件上传")
public class Files extends Model<Files> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 文件类型
     */
    @ApiModelProperty(value = "文件类型")
    @TableField("type")
    private Integer type;

    /**
     * 文件名称
     */
    @ApiModelProperty(value = "文件名称")
    @TableField("file_name")
    private String fileName;

    /**
     * URL地址
     */
    @ApiModelProperty(value = "URL地址")
    @TableField("url")
    private String url;

    /**
     * 添加用户id
     */
    @ApiModelProperty(value = "添加用户id")
    @TableField("create_user_id")
    private Integer createUserId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private Date createDate;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
